/**
* 
* ====================================================================
*
* @author apov <apov@ymail.com>
*/ 
// Start_End_Tick.h
//
#pragma once

#include "BaseDefine.h"
#include "TickSaver.h"

/**
* @class Start_End_Time
*  - 
*/ 
class Start_End_Time{
	enum{
		DEF_MAX_TICK=					3,
		DEF_START_IDX=					0,
		DEF_END_IDX=					1,
		DEF_NFY_IDX=					2,
	};

public:
	enum{
		DEF_NO=					0,
		DEF_NOW=				1,
		DEF_MIN=				2,
		DEF_SEC=				3,
	};

	void set_type( int type );
	void set_start( int start, int end );
	void set_end( int end );

	int get_type();	
	int get_start( int& min, int& sec );
	int get_end( int& min, int& sec );	

	bool is_set_start();
	bool is_set_end();

	Start_End_Time();
	virtual ~Start_End_Time();

protected:

private:
	int get( int& min, int& sec, int start_or_end );

	int type_;
	TickSaver tick_;
};
